package pBonus_SEMAPHORES_from_jenkow;

public class Semaphore {

	private boolean signal=false;
	
	public synchronized void take(){
		this.signal=true;
		this.notify();
	}
	
	public synchronized void release()throws InterruptedException {
		
		while (!this.signal) wait();
		this.signal=false;
		
	}
	
	public static void main(String[] args) {
		System.out.println("ne sharu semaforiv =)");
	}

}
